1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package com.google.common.collect.testing.testers;
18
19 import com.google.common.annotations.GwtCompatible;
20 import com.google.common.collect.testing.AbstractCollectionTester;
21
22
23
24
25
26
27 @GwtCompatible
28 public class CollectionEqualsTester<E> extends AbstractCollectionTester<E> {
29 public void testEquals_self() {
30 assertTrue("An Object should be equal to itself.",
31 collection.equals(collection));
32 }
33
34 public void testEquals_null() {
35
36 assertFalse("An object should not be equal to null.",
37 collection.equals(null));
38 }
39
40 public void testEquals_notACollection() {
41
42 assertFalse("A Collection should never equal an "
43 + "object that is not a Collection.",
44 collection.equals("huh?"));
45 }
46 }